using JoyfulHomeJourney.BackEnd.Infrastructure.EFCore;
using JoyfulHomeJourney.BackEnd.Infrastructure.Dtos.Responses.Objects;
using JoyfulHomeJourney.BackEnd.Infrastructure.Tools;
namespace JoyfulHomeJourney.BackEnd.Server.Instances.Extends.Responses
{
	public static class CustomerOrdersExtend
{
		public static ResponseCustomerOrdersDto ToResponseDto(this CustomerOrders entity)
{			return new ResponseCustomerOrdersDto
			{
				id = entity.CoId,
				accountId = entity.CoAccountId,
				status = entity.CoStatus,
				payCount = entity.CoPayCount,
				discountId = entity.OdDiscountId,
				deductionId = entity.OdDeductionId,
				createAt = entity.CoCreateAt,
				createAtStr =Tools.TimeToString(entity.CoCreateAt),
				updateAt = entity.CoUpdateAt,
				updateAtStr =Tools.TimeToString(entity.CoUpdateAt),
			};
		}
	}
}
